package org.jeecg.modules.appuser.api.pdd;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.mall.entity.TbMnOrder;
import org.jeecg.modules.mall.entity.TbMnUser;
import org.jeecg.modules.mall.service.ITbMnOrderService;
import org.jeecg.modules.mall.service.ITbMnUserService;
import org.jeecg.modules.pdd.entity.PddGoodsOrder;
import org.jeecg.modules.pdd.service.IPddGoodsOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 描述
 * </p>
 *
 */
@Slf4j
@Api(tags = "app拼多多")
@RestController
@RequestMapping("/app/pdd/api")
public class PddOrderController {

    @Autowired
    private IPddGoodsOrderService pddGoodsOrderService;

    @AutoLog("查询拼多多的订单信息")
    @ApiOperation(value = "查询拼多多的订单信息", notes = "订单查询")
    @PostMapping(value = "/queryOrders")
    public Result<?> queryPddOrders(PddGoodsOrder pddGoodsOrder, @RequestParam(name="user_id") String user_id,
                                    @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
                                    @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
                                    HttpServletResponse response, HttpServletRequest request){

      return   pddGoodsOrderService.queryOrders(pddGoodsOrder,user_id,pageNo,pageSize, request);

    }
}
